// delivery

// 一级路由
import dmallHome from '@/views/dmall/index'
import todoList from '@/views/ebook/index.js'
import detail from '@/views/detail/index'

// 二级路由
import deliveryHome from '@/views/dmall/pages/deliveryHome'
import classify from '@/views/dmall/pages/classify'
import myCart from '@/views/dmall/pages/myCart'
import vip from '@/views/dmall/pages/vip'
import mine from '@/views/dmall/pages/mine'

/**
 *  重定向路径
 *  路由路径
 */

const routes = [
  {
    path: '/',
    redirect: '/dmallHome'
  },
  {
    path: '/dmallHome',
    component: dmallHome,
    children: [
      {
        path: '/dmallHome',
        redirect: '/dmallHome/deliveryHome'
      },
      {
        path: '/dmallHome/deliveryHome',
        component: deliveryHome
      },
      {
        path: '/dmallHome/classify',
        component: classify
      },
      {
        path: '/dmallHome/vip',
        component: vip
      },
      {
        path: '/dmallHome/myCart',
        component: myCart
      },
      {
        path: '/dmallHome/mine',
        component: mine
      }
    ]
  },
  {
    path: '/todoList',
    component: todoList
  },
  {
    path: '/detail/:id',
    component: detail
  }

]

export default routes;

